package cn.tedu.review;
/*本类用于复写多线程编程方案1*/
public class Demo {
    public static void main(String[] args) {
        Mythread t1 = new Mythread();
        Mythread t2 = new Mythread();
        Mythread t3 = new Mythread();
        Mythread t4 = new Mythread();
        t1.run();
        t2.run();
        t3.run();
        t4.run();
    }

}
//1,定义一个多线程类,继承Thread类
class Mythread extends Thread{
    //2,重写父类的run()
    @Override
    public  void  run(){
        //3,完成自己业务
        for (int i = 0; i < 10; i++) {
            System.out.println(i+"="+getName());
        }
    }
}